﻿// $Id$
/*! \file
 * \brief Definition of Northwind.DomainModel.Shipper.
 *
 * \author $Author$
 * \date $Date$
 * \version $Revision$
 */

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Xml.Serialization;
using Salamanca.DataAccess;
using Salamanca.DataAccess.Collections;
using Salamanca.DataRules;
#if (!NET_CF)
using System.Diagnostics.CodeAnalysis;
using System.Runtime.Serialization;
#endif

namespace Northwind.DomainModel
{



    ///////////////////////////////////////////////////////////////////////////
    ///
    /// <summary />
    ///
    ///////////////////////////////////////////////////////////////////////////

    public partial interface IShipperContainer
    {
    }



    ///////////////////////////////////////////////////////////////////////////
    ///
    /// <summary />
    ///
    ///////////////////////////////////////////////////////////////////////////

    public partial interface IShipperMapper:
        IDataMapper
    {
    }



    ///////////////////////////////////////////////////////////////////////////
    ///
    /// <summary />
    ///
    ///////////////////////////////////////////////////////////////////////////

#if (!NET_CF)
    [Serializable]
    [DataObject]
#endif
    public partial class Shipper:
        DomainModel<Shipper.PrimaryKey, Shipper.DataTransfer>
    {

        /// <summary />
#if (!NET_CF)
        [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
#endif
        public partial class PrimaryKey:
            PrimaryKey<int>
        {

            /// <summary />
            public PrimaryKey():
                base()
            {
            }

            /// <summary />
            public PrimaryKey(int key):
                base(key)
            {
            }

        }

        /// <summary />
        [SoapType("ShipperData", "http://www.codeplex.com/salamanca/northwind/domainmodel/")]
        [XmlType("ShipperData", Namespace="http://www.codeplex.com/salamanca/northwind/domainmodel/")]
#if (!NET_CF)
        [Serializable]
        [SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")]
#endif
        public partial class DataTransfer:
            IDataTransferObject
        {
        }

        /// <summary />
        public Shipper():
            base()
        {
        }

        /// <summary />
        public Shipper(DataMapperCollection dataMappers):
            base(dataMappers)
        {
        }

#if (!NET_CF)
        /// <summary />
        protected Shipper(SerializationInfo info, StreamingContext context):
            base(info, context)
        {
        }
#endif

        /// <summary />
        [StringLengthRule(40)]
        [NotNullRule]
#if (!NET_CF)
        [DataObjectField(false, false, false)]
#endif
        public string CompanyName
        {
            get
            {
                return _CompanyNameProperty;
            }
            set
            {
                if (_CompanyNameProperty!=value)
                {
                    _CompanyNameProperty=value;
                    RaisePropertyChanged("CompanyName");
                }
            }
        }

        /// <summary />
        [StringLengthRule(24)]
#if (!NET_CF)
        [DataObjectField(false, false, true)]
#endif
        public string Phone
        {
            get
            {
                return _PhoneProperty;
            }
            set
            {
                if (_PhoneProperty!=value)
                {
                    _PhoneProperty=value;
                    RaisePropertyChanged("Phone");
                }
            }
        }

    }
}
